The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement. (Error 3258)

You tried to execute an SQL statement that contains multiple joins; the results of the query can differ depending on the order in which the joins are performed. For example, this error can occur if you execute the following SQL statement:

SELECT * FROM Customers, Orders, [Order Details],

Customers LEFT JOIN Orders

ON Customers.CustomerID = Orders.CustomerID,

Orders INNER JOIN [Order Details]

ON Orders.OrderID = [Order Details].OrderID;

Executing this statement produces an error because the order of the joins is ambiguous. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement. The following queries illustrate how you might construct the preceding query so that the INNER JOIN operation is performed before the LEFT JOIN and RIGHT JOIN operation:

Query1

SELECT * FROM Orders, [Order Details],

Orders INNER JOIN [Order Details]

ON Orders. OrderID = [Order Details].OrderID;

Query2

SELECT * FROM Customers, Query1,

Customers LEFT JOIN Query1

ON Customers.CustomerID = Orders.CustomerID;